package cn.mastor;

import cn.mastor.liaotian.ChatServerStarter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@ServletComponentScan("cn/mastor/service/*")
@MapperScan("cn/mastor/mapper/*")
public class ChatApp {
    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext context = SpringApplication.run(ChatApp.class);
        ChatServerStarter chatServerStarter = context.getBean(ChatServerStarter.class);
        chatServerStarter.start();
    }
}
